package com.tebiecloud.mpopen.client.service;

import com.tebiecloud.common.model.ResultBody;
import com.tebiecloud.mpopen.client.model.mpopen.AccessToken;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 微信开放平台接口
 * @Author: tebie
 * @Date: 2019-09-07 10:44
 */
public interface IMpopenApiServiceClient {

    /**
     * 获取微信接口调用凭据
     * @param appid
     * @param force
     * @return
     */
    @PostMapping("/feign/api/infoWxapiAccessToken")
    ResultBody<String> getWxapiAccessToken(@RequestParam("appid") String appid, @RequestParam("force") boolean force);

    /**
     * 网页授权，通过 code 换取 access_token
     * @param appid
     * @param code
     * @return
     */
    @PostMapping("/feign/api/infoAccessToken")
    ResultBody<AccessToken> getAccessToken(@RequestParam("appid") String appid, @RequestParam("code") String code);

}
